package com.qidian.mes.device.controller;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.service.ScmsService;
import com.qidian.mes.pojo.Scms;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/21 10:34
 */
@RestController
@RequestMapping("/scms")
@CrossOrigin
public class ScmsController {
    @Autowired
    private ScmsService scmsService;
    @GetMapping("/list")
    public MESResult select(Scms scms){
        return scmsService.select(scms);
    }
    @PostMapping("/insert")
    public MESResult insert(@RequestBody Scms scms){
        return scmsService.insert(scms);
    }
    @PutMapping("/update")
    public MESResult update(@RequestBody Scms scms){
        return scmsService.update(scms);
    }
    @GetMapping("/selectById")
    public MESResult selectById(Long scmsId){
        return scmsService.selectById(scmsId);
    }
    @DeleteMapping("/delete")
    public MESResult delete(Long scmsId){
        return scmsService.delete(scmsId);
    }
}
